package com.neu.fenli2023623.service.impl;

import com.neu.fenli2023623.dto.HospitalnavigationDto;
import com.neu.fenli2023623.entity.Hospitalnavigation;
import com.neu.fenli2023623.mapper.HospitalnavigationMapper;
import com.neu.fenli2023623.service.HospitalnavigationService;
import com.neu.fenli2023623.vo.HospitalnavigationVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class HospitalnavigationServiceImpl implements HospitalnavigationService {
    @Autowired
    private HospitalnavigationMapper hospitalnavigationMapper;

    @Override
    public List<HospitalnavigationVo> quaryall() {
        return hospitalnavigationMapper.selectall();
    }

    @Override
    public List<Hospitalnavigation> selectByName(String name) {
        return hospitalnavigationMapper.selectByName(name);
    }

    @Override
    public int deleteById(Long id) {
        return hospitalnavigationMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int addHospital(HospitalnavigationDto record) {
        return hospitalnavigationMapper.insert(record);
    }

    @Override
    public Hospitalnavigation selectById(Long id) {
        return hospitalnavigationMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateHospital(HospitalnavigationDto record) {
        return hospitalnavigationMapper.updateByPrimaryKey(record);
    }
}
